<template>
    <div class="table">
             <el-table
          :data="data"
          style="width: 100%"
          height="610"
          stripe
          :default-sort="{ prop: 'date', order: 'descending' }"
          :cell-style="rowClass"
          :header-cell-style="headClass"
          class="tableBox"
        >
          <el-table-column type="index" label="序号" >
          </el-table-column>
          <el-table-column prop="itemName" label="项目名称" >
          </el-table-column>
          <el-table-column prop="itemCode" label="项目编码" 
          >
           <!-- sortable排序 -->
          </el-table-column>
          <el-table-column prop="deptCode/buildOrg" label="项目所属单位、建设单位">
          </el-table-column>
         
          <el-table-column
            prop="buildScale"
            label="建设规模"
            :formatter="formatter"
          >
          </el-table-column>
          <el-table-column
            prop="itemCategory"
            label="项目类别"
            :formatter="formatter"
          >
          </el-table-column>
          <el-table-column
            prop="itemType"
            label="项目类型"
        
          >
          </el-table-column>
          <el-table-column
            prop="paStartDate"
            label="建设起始时间"
            :formatter="formatter"
          >
          </el-table-column>
           <el-table-column
            prop="paCmplDate"
            label="建设结束时间"
          >
          </el-table-column>
          <el-table-column
            prop="investTotal"
            label="总投资"
          >
          </el-table-column>
           <el-table-column
            prop="thisYearInvest"
            label="本年度累计投资计划"
           
            
          >
          </el-table-column>
        
           <el-table-column
            prop="nextYearInvest"
            label="下一年度投资计划"
           
          
          >
          </el-table-column>
           <el-table-column
            prop="nextYearInvestContent"
            label="下一年度投资内容"
           
          
          >
          </el-table-column>
           <el-table-column
            prop="remark"
            label="备注" 
          >
          </el-table-column>

        </el-table>
          <div class="block">
          <el-pagination
          background
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
             :page-sizes="[1,2,3,4,5]"
            :page-size="3"
             :pager-count="5"
            layout="total, sizes, prev, pager, next, jumper"
            :total="data.length"
          >
          </el-pagination>
        </div>
         <div class="totalA">当前{{paginal}}条每页</div>
    </div>
</template>

<script>
    export default {
        props:['data'],
        data () {
            return {
                 currentPage4: 1,      paginal:'3',
            }
        },
        mounted () {
            // console.log('table');
          //  console.log(this.data) 
        },
        methods: {
    formatter(row, column) {
      return row.address;
    },
              // 表头样式设置
    headClass() {
      return "text-align: center;background:#eef1f6;height:81px;";
    },
      // 表格样式设置
     rowClass() {
      return "text-align: center;height:75px;";
    },
    handleSizeChange(val) { this.paginal=val
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
        }
    }
</script>

<style scoped>
@import "../../components/planIssued/pagination.css";

</style>